/**
 *
 * 服务分类管理
 *
 **/

import request from '@/utils/request'

// 查询服务分类列表接口
export const getServiceCategoryPage = (params: any) => {
  return request({
    url: '/service-category/page',
    method: 'get',
    params
  });
};

// 删除服务分类接口
export const deleServiceCategory = (ids: string) => {
  return request({
    url: '/service-category',
    method: 'delete',
    params: { id:ids }
  });
};

// 修改服务分类接口
export const editServiceCategory = (params: any) => {
  return request({
    url: '/service-category',
    method: 'put',
    data: { ...params }
  });
};

// 新增服务分类接口
export const addServiceCategory = (params: any) => {
  return request({
    url: '/service-category',
    method: 'post',
    data: { ...params }
  });
};

// 修改服务分类启用禁用接口
export const enableOrDisableServiceCategory = (params: any) => {
  return request({
    url: `/service-category/status/${params.status}`,
    method: 'post',
    params: { id:params.id }
  })
}